Optimal. Leaf size=288 \[ 2 a b m n x-4 b^2 m n^2 x+2 b m n (a-b n) x+4 b^2 m n x \log \left (c x^n\right )-m x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b e m n (a-b n) \log (e+f x)}{f}-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2 b^2 e m n \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )}{f}+\frac {e m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{f}+\frac {2 b e m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 288, normalized size of antiderivative = 1.00, number of steps
used = 18, number of rules used = 11, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {2333, 2332,
2418, 6, 45, 2393, 2354, 2438, 2395, 2421, 6724} \begin {gather*} \frac {2 b e m n \text {PolyLog}\left (2,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{f}-\frac {2 b^2 e m n^2 \text {PolyLog}\left (2,-\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \text {PolyLog}\left (3,-\frac {f x}{e}\right )}{f}+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+\frac {e m \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{f}-m x \left (a+b \log \left (c x^n\right )\right )^2-2 a b n x \log \left (d (e+f x)^m\right )-\frac {2 b e m n (a-b n) \log (e+f x)}{f}+2 a b m n x+2 b m n x (a-b n)-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-\frac {2 b^2 e m n \log \left (c x^n\right ) \log \left (\frac {f x}{e}+1\right )}{f}+4 b^2 m n x \log \left (c x^n\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-4 b^2 m n^2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 45
Rule 2332
Rule 2333
Rule 2354
Rule 2393
Rule 2395
Rule 2418
Rule 2421
Rule 2438
Rule 6724
Rubi steps
\begin {align*} \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx &=-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-(f m) \int \left (-\frac {2 a b n x}{e+f x}+\frac {2 b^2 n^2 x}{e+f x}-\frac {2 b^2 n x \log \left (c x^n\right )}{e+f x}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e+f x}\right ) \, dx\\ &=-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-(f m) \int \left (\frac {\left (-2 a b n+2 b^2 n^2\right ) x}{e+f x}-\frac {2 b^2 n x \log \left (c x^n\right )}{e+f x}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e+f x}\right ) \, dx\\ &=-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-(f m) \int \frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e+f x} \, dx+\left (2 b^2 f m n\right ) \int \frac {x \log \left (c x^n\right )}{e+f x} \, dx+(2 b f m n (a-b n)) \int \frac {x}{e+f x} \, dx\\ &=-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-(f m) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{f}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{f (e+f x)}\right ) \, dx+\left (2 b^2 f m n\right ) \int \left (\frac {\log \left (c x^n\right )}{f}-\frac {e \log \left (c x^n\right )}{f (e+f x)}\right ) \, dx+(2 b f m n (a-b n)) \int \left (\frac {1}{f}-\frac {e}{f (e+f x)}\right ) \, dx\\ &=2 b m n (a-b n) x-\frac {2 b e m n (a-b n) \log (e+f x)}{f}-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-m \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx+(e m) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{e+f x} \, dx+\left (2 b^2 m n\right ) \int \log \left (c x^n\right ) \, dx-\left (2 b^2 e m n\right ) \int \frac {\log \left (c x^n\right )}{e+f x} \, dx\\ &=-2 b^2 m n^2 x+2 b m n (a-b n) x+2 b^2 m n x \log \left (c x^n\right )-m x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b e m n (a-b n) \log (e+f x)}{f}-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2 b^2 e m n \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )}{f}+\frac {e m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{f}+(2 b m n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx-\frac {(2 b e m n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{x} \, dx}{f}+\frac {\left (2 b^2 e m n^2\right ) \int \frac {\log \left (1+\frac {f x}{e}\right )}{x} \, dx}{f}\\ &=2 a b m n x-2 b^2 m n^2 x+2 b m n (a-b n) x+2 b^2 m n x \log \left (c x^n\right )-m x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b e m n (a-b n) \log (e+f x)}{f}-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2 b^2 e m n \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )}{f}+\frac {e m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{f}+\frac {2 b e m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{f}+\left (2 b^2 m n\right ) \int \log \left (c x^n\right ) \, dx-\frac {\left (2 b^2 e m n^2\right ) \int \frac {\text {Li}_2\left (-\frac {f x}{e}\right )}{x} \, dx}{f}\\ &=2 a b m n x-4 b^2 m n^2 x+2 b m n (a-b n) x+4 b^2 m n x \log \left (c x^n\right )-m x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b e m n (a-b n) \log (e+f x)}{f}-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2 b^2 e m n \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )}{f}+\frac {e m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{f}+\frac {2 b e m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 507, normalized size = 1.76 \begin {gather*} \frac {-a^2 f m x+4 a b f m n x-6 b^2 f m n^2 x-2 a b f m x \log \left (c x^n\right )+4 b^2 f m n x \log \left (c x^n\right )-b^2 f m x \log ^2\left (c x^n\right )+a^2 e m \log (e+f x)-2 a b e m n \log (e+f x)+2 b^2 e m n^2 \log (e+f x)-2 a b e m n \log (x) \log (e+f x)+2 b^2 e m n^2 \log (x) \log (e+f x)+b^2 e m n^2 \log ^2(x) \log (e+f x)+2 a b e m \log \left (c x^n\right ) \log (e+f x)-2 b^2 e m n \log \left (c x^n\right ) \log (e+f x)-2 b^2 e m n \log (x) \log \left (c x^n\right ) \log (e+f x)+b^2 e m \log ^2\left (c x^n\right ) \log (e+f x)+a^2 f x \log \left (d (e+f x)^m\right )-2 a b f n x \log \left (d (e+f x)^m\right )+2 b^2 f n^2 x \log \left (d (e+f x)^m\right )+2 a b f x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-2 b^2 f n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+b^2 f x \log ^2\left (c x^n\right ) \log \left (d (e+f x)^m\right )+2 a b e m n \log (x) \log \left (1+\frac {f x}{e}\right )-2 b^2 e m n^2 \log (x) \log \left (1+\frac {f x}{e}\right )-b^2 e m n^2 \log ^2(x) \log \left (1+\frac {f x}{e}\right )+2 b^2 e m n \log (x) \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )+2 b e m n \left (a-b n+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )-2 b^2 e m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.49, size = 10356, normalized size = 35.96
method | result | size |
risch | \(\text {Expression too large to display}\) | \(10356\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________